//
//  zhucetextview.m
//  gangquOASystem
//
//  Created by michael on 2018/7/12.
//  Copyright © 2018年 czd. All rights reserved.
//

#import "zhucetextview.h"

@implementation zhucetextview
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
//               [self setValue:[UIFont boldSystemFontOfSize:13] forKeyPath:@"_placeholderLabel.font"];
//               [self setValue:[UIColor colorWithHexString:@"aeaeae"] forKeyPath:@"_placeholderLabel.textColor"];
self.font = [UIFont systemFontOfSize:13.f];
                self.layer.cornerRadius=8.0f;
        
   self.layer.masksToBounds=YES;
    self.layer.borderColor=[[UIColor colorWithHexString:@"aeaeae"]CGColor];
    self.layer.borderWidth= 1.0f;
[self test];
    }
    return self;
}
- (void)test{

    //监听开始编辑状态
//    [self addTarget:self action:@selector(searchTextFieldChange:) forControlEvents:UIControlEventEditingChanged];// 可在自定义selector处
//    //监听编辑完成的状态
//    [self addTarget:self action:@selector(endediting) forControlEvents:UIControlEventEditingDidEnd];// 可在自定义selector处
}
- (void)searchTextFieldChange:(UITextView *)TextView{

 self.text =[TextView.text stringByReplacingOccurrencesOfString:@" " withString:@""];

 

 }
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
